﻿using System;
using NPipeline.Driver;
using NPipeline.Stage;


namespace NPipeline.Samples
{
    class Program
    {

        static void Main(string[] args)
        {
            // Very very simple sample of the pipeline - running one string
            // through the pipeline and output the string
            ConsoleOutStage stage1 = new ConsoleOutStage("FIRST");
            ConsoleOutStage stage2 = new ConsoleOutStage("SECOND");
            ConsoleOutStage stage3 = new ConsoleOutStage("THIRD");

            GenericStageDriverFactory<SynchronousStageDriver> factory =
                new GenericStageDriverFactory<SynchronousStageDriver>();


            Pipeline p = new Pipeline();

            p.AddStage(stage1, factory);
            p.AddStage(stage2, factory);
            p.AddStage(stage3, factory);


            p.Start();
            p.getSourceFeeder().Feed("Hello World");

            p.Finish();

            Console.ReadKey();

        }
    }
}
